package jmine.tec.aom.builder;

import jmine.tec.aom.domain.PropertyGroup;
import bancosys.tec.persist.builders.AbstractDBBuilder;

/**
 * Test builder for {@link PropertyGroup}.
 * 
 * @author jrenaut
 */
public class PropertyGroupBuilder extends AbstractDBBuilder<PropertyGroup> {

    public static PropertyGroupBuilder aPropertyGroup() {
        return new PropertyGroupBuilder();
    }

    private String mnemonic = "a property group";

    /**
     * {@inheritDoc}
     */
    @Override
    protected PropertyGroup doBuild() {
        PropertyGroup pg = this.createBean(PropertyGroup.class);
        pg.setMnemonic(this.mnemonic);
        return pg;
    }

    /**
     * @param mne the desired mnemonic
     * @return the {@link PropertyGroupBuilder}
     */
    public PropertyGroupBuilder withMnemonic(String mne) {
        this.mnemonic = mne;
        return this;
    }

}
